package com.gb.models.user.service;

import com.gb.models.user.dao.SysUserDao;
import com.gb.models.user.model.SysUserEntity;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SysUserService {

	@Resource
	private SysUserDao sysUserDao;

	public int save(SysUserEntity entity) {
		return sysUserDao.save(entity);
	}

	public int updateUserById(SysUserEntity sysUser){
		return sysUserDao.updateUserById(sysUser);
	}
	
	public List<SysUserEntity> queryUserList(SysUserEntity sysUser){
		return sysUserDao.queryUserPageList(sysUser);
	}

	public SysUserEntity queryUserByUsernameAndPassword(String username, String password){
		return sysUserDao.queryUserByUsernameAndPassword(username, password);
	}
	
}
